<#import "/admin/_layout.html" as layout>
<@layout.header "小程序设置"></@layout.header>
<@layout.body>
    <div class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-left">
                        <li class="breadcrumb-item"><a href="#">设置</a></li>
                        <li class="breadcrumb-item active">小程序</li>
                    </ol>
                </div>
            </div>
        </div>
    </div>
    <section class="content">
        <div class="container-fluid">
            <div class="card card-default">
                <form id="myForm" method="POST" action="/admin/config/doSave">
                    <input type="hidden" name="listener" value="">
                    <div class="card-body">
                        <div class="form-group">
                            <label for="roleName">商户号</label>
                            <input type="text" name="wechat_mch_id" class="form-control" id="wechat_mch_id" placeholder="请输入商户号" value="${jeegotConfig("wechat_mch_id")!}">
                        </div>
                        <div class="form-group">
                            <label for="roleName">商户密钥</label>
                            <input type="text" name="wechat_mch_secret" class="form-control" id="wechat_mch_secret" placeholder="请输入商户密钥" value="${jeegotConfig("wechat_mch_secret")!}">
                        </div>
                    </div>
                    <div class="card-footer">
                        <button type="submit" class="btn btn-primary">提交</button>
                    </div>
                </form>
            </div>
        </div>
    </section>
</@layout.body>
<@layout.script>
    <script>
        $(function () {
            submitForm({
                wechat_mch_id: { required: true},
                wechat_mch_secret: { required: true}
            },{
                wechat_mch_id: {required: "请输入商户号"},
                wechat_mch_secret: {required: "请输入商户密钥"}
            })
        });
    </script>
</@layout.script>